Adding the custom functions

The Meridian Portal integration setup files include numerous custom functions that must be imported into the vault configuration. These are defined in the files that you installed as described in Installing the files.

To add the custom functions:

  1. Open the setup file Configuration\M360 Script.vbs in any text editor and copy the contents of the M360 Section (M360 Event Functions, M360 Helper functions, M360 Event Handler Support Functions, and M360 Command Handlers) to the clipboard.
  2. In Configurator, open the Meridian Enterprise Script Editor.
  3. Paste the contents of the clipboard to the end of the script.
  4. Click OK to save your changes.

Following are some remarks about Meridian Portal script for vaults based on the BlueCielo Industry Template. If necessary, modify the script to meet your business requirements.

Sub M360_AfterImportDocument

When a document is imported from Meridian Portal and if content was modified, it is routed to the Review state. If the document was not modified, it is routed to Under Change.

For documents that are returned in review packages, the property AMDocumentPropertySet._HAS_RENDITION_REDLINES is set to TRUE indicate on the Document page the presence of any annotations. For this feature to work requires that you merge the registry file Configuration\SafeProperties.reg by running it.

Sub M360_AfterReturnPackage

Sends a notification message upon package import. Make sure the notification is configured in your environment as described in Configuring event notifications or remove the following line:

Vault.SendNotification "PackageImported", Package

Function M360_AfterAddToPackage

When a released document is added to a package, a workflow is started.

Function M360_TargetDocument

This function might need to be adjusted to find the document upon import from the returned package.

Function M360_WriteTransmittal

This event writes the transmittal header. See details in About the transmittal template.

Function VaultPackages and Function ValidatePackage(PackageNumber)

These functions are used to find and validate the packages in a project. They use the workflow status text as criteria. If the default package workflow status text was modified, the following line should be adjusted accordingly.

sStatus = "Under Change"

Sub M360DocGenericEvent_AfterNewDocument

This procedure is used to set properties for new packages. Review this code carefully.

Sub M360FolderGenericEvent_AfterNewFolder

See Configuring the project folder type.

Sub M360DocCWFEvent_BeforeExecuteTransition

This event is used to send a package to Meridian Portal and also to execute the relevant workflow transition on all documents included in the package. Review the code carefully and modify it to match your custom workflow.

Sub cmdM360AcceptThisCopy_Execute

This command is used to accept a conflicting document. While doing this, the document is moved to the relevant workflow state. Review the code carefully and modify it to match your custom workflow.